const {User} = require("../../../models/User");

module.exports = async (req, res) => {
    var {Art_No,user_id} = req.body
    try{
       const up1 = await User.updateOne({user_id:user_id},{ $push : { "collections": {"Art_No": Art_No} } })
       res.send({errCode:"0",msg:"收藏成功"})
    }catch(e){
        res.status(400).send({errCode:"1",msg:"请先登录"})
    }
}